import 'package:taonile/generated/json/base/json_convert_content.dart';
import 'package:taonile/entity/getcash_record_entity.dart';

GetcashRecordEntity $GetcashRecordEntityFromJson(Map<String, dynamic> json) {
	final GetcashRecordEntity getcashRecordEntity = GetcashRecordEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		getcashRecordEntity.code = code;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		getcashRecordEntity.msg = msg;
	}
	final GetcashRecordData? data = jsonConvert.convert<GetcashRecordData>(json['data']);
	if (data != null) {
		getcashRecordEntity.data = data;
	}
	return getcashRecordEntity;
}

Map<String, dynamic> $GetcashRecordEntityToJson(GetcashRecordEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['msg'] = entity.msg;
	data['data'] = entity.data.toJson();
	return data;
}

GetcashRecordData $GetcashRecordDataFromJson(Map<String, dynamic> json) {
	final GetcashRecordData getcashRecordData = GetcashRecordData();
	final String? currentPage = jsonConvert.convert<String>(json['current_page']);
	if (currentPage != null) {
		getcashRecordData.currentPage = currentPage;
	}
	final List<GetcashRecordDataData>? data = jsonConvert.convertListNotNull<GetcashRecordDataData>(json['data']);
	if (data != null) {
		getcashRecordData.data = data;
	}
	return getcashRecordData;
}

Map<String, dynamic> $GetcashRecordDataToJson(GetcashRecordData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['current_page'] = entity.currentPage;
	data['data'] =  entity.data.map((v) => v.toJson()).toList();
	return data;
}

GetcashRecordDataData $GetcashRecordDataDataFromJson(Map<String, dynamic> json) {
	final GetcashRecordDataData getcashRecordDataData = GetcashRecordDataData();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		getcashRecordDataData.id = id;
	}
	final String? userId = jsonConvert.convert<String>(json['user_id']);
	if (userId != null) {
		getcashRecordDataData.userId = userId;
	}
	final String? orderSn = jsonConvert.convert<String>(json['order_sn']);
	if (orderSn != null) {
		getcashRecordDataData.orderSn = orderSn;
	}
	final String? money = jsonConvert.convert<String>(json['money']);
	if (money != null) {
		getcashRecordDataData.money = money;
	}
	final String? handingfee = jsonConvert.convert<String>(json['handingfee']);
	if (handingfee != null) {
		getcashRecordDataData.handingfee = handingfee;
	}
	final String? receivedMoney = jsonConvert.convert<String>(json['received_money']);
	if (receivedMoney != null) {
		getcashRecordDataData.receivedMoney = receivedMoney;
	}
	final String? accountId = jsonConvert.convert<String>(json['account_id']);
	if (accountId != null) {
		getcashRecordDataData.accountId = accountId;
	}
	final GetcashRecordDataDataAccountText? accountText = jsonConvert.convert<GetcashRecordDataDataAccountText>(json['account_text']);
	if (accountText != null) {
		getcashRecordDataData.accountText = accountText;
	}
	final String? memo = jsonConvert.convert<String>(json['memo']);
	if (memo != null) {
		getcashRecordDataData.memo = memo;
	}
	final String? status = jsonConvert.convert<String>(json['status']);
	if (status != null) {
		getcashRecordDataData.status = status;
	}
	final String? transfertime = jsonConvert.convert<String>(json['transfertime']);
	if (transfertime != null) {
		getcashRecordDataData.transfertime = transfertime;
	}
	final String? reason = jsonConvert.convert<String>(json['reason']);
	if (reason != null) {
		getcashRecordDataData.reason = reason;
	}
	final String? createdAt = jsonConvert.convert<String>(json['created_at']);
	if (createdAt != null) {
		getcashRecordDataData.createdAt = createdAt;
	}
	final String? updatedAt = jsonConvert.convert<String>(json['updated_at']);
	if (updatedAt != null) {
		getcashRecordDataData.updatedAt = updatedAt;
	}
	return getcashRecordDataData;
}

Map<String, dynamic> $GetcashRecordDataDataToJson(GetcashRecordDataData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['user_id'] = entity.userId;
	data['order_sn'] = entity.orderSn;
	data['money'] = entity.money;
	data['handingfee'] = entity.handingfee;
	data['received_money'] = entity.receivedMoney;
	data['account_id'] = entity.accountId;
	data['account_text'] = entity.accountText.toJson();
	data['memo'] = entity.memo;
	data['status'] = entity.status;
	data['transfertime'] = entity.transfertime;
	data['reason'] = entity.reason;
	data['created_at'] = entity.createdAt;
	data['updated_at'] = entity.updatedAt;
	return data;
}

GetcashRecordDataDataAccountText $GetcashRecordDataDataAccountTextFromJson(Map<String, dynamic> json) {
	final GetcashRecordDataDataAccountText getcashRecordDataDataAccountText = GetcashRecordDataDataAccountText();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		getcashRecordDataDataAccountText.id = id;
	}
	final String? userId = jsonConvert.convert<String>(json['user_id']);
	if (userId != null) {
		getcashRecordDataDataAccountText.userId = userId;
	}
	final String? type = jsonConvert.convert<String>(json['type']);
	if (type != null) {
		getcashRecordDataDataAccountText.type = type;
	}
	final String? realName = jsonConvert.convert<String>(json['real_name']);
	if (realName != null) {
		getcashRecordDataDataAccountText.realName = realName;
	}
	final String? idNumber = jsonConvert.convert<String>(json['id_number']);
	if (idNumber != null) {
		getcashRecordDataDataAccountText.idNumber = idNumber;
	}
	final String? bankNumber = jsonConvert.convert<String>(json['bank_number']);
	if (bankNumber != null) {
		getcashRecordDataDataAccountText.bankNumber = bankNumber;
	}
	final String? bankName = jsonConvert.convert<String>(json['bank_name']);
	if (bankName != null) {
		getcashRecordDataDataAccountText.bankName = bankName;
	}
	final String? province = jsonConvert.convert<String>(json['province']);
	if (province != null) {
		getcashRecordDataDataAccountText.province = province;
	}
	final String? city = jsonConvert.convert<String>(json['city']);
	if (city != null) {
		getcashRecordDataDataAccountText.city = city;
	}
	final String? district = jsonConvert.convert<String>(json['district']);
	if (district != null) {
		getcashRecordDataDataAccountText.district = district;
	}
	final String? bankBranch = jsonConvert.convert<String>(json['bank_branch']);
	if (bankBranch != null) {
		getcashRecordDataDataAccountText.bankBranch = bankBranch;
	}
	final String? mobile = jsonConvert.convert<String>(json['mobile']);
	if (mobile != null) {
		getcashRecordDataDataAccountText.mobile = mobile;
	}
	final String? createdAt = jsonConvert.convert<String>(json['created_at']);
	if (createdAt != null) {
		getcashRecordDataDataAccountText.createdAt = createdAt;
	}
	final String? updatedAt = jsonConvert.convert<String>(json['updated_at']);
	if (updatedAt != null) {
		getcashRecordDataDataAccountText.updatedAt = updatedAt;
	}
	return getcashRecordDataDataAccountText;
}

Map<String, dynamic> $GetcashRecordDataDataAccountTextToJson(GetcashRecordDataDataAccountText entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['user_id'] = entity.userId;
	data['type'] = entity.type;
	data['real_name'] = entity.realName;
	data['id_number'] = entity.idNumber;
	data['bank_number'] = entity.bankNumber;
	data['bank_name'] = entity.bankName;
	data['province'] = entity.province;
	data['city'] = entity.city;
	data['district'] = entity.district;
	data['bank_branch'] = entity.bankBranch;
	data['mobile'] = entity.mobile;
	data['created_at'] = entity.createdAt;
	data['updated_at'] = entity.updatedAt;
	return data;
}